package basics.day15.second;

public class Test {
    public static void main(String[] args) {
        // fun_1();
        fun_2();
    }

    public static void fun_1() {
        int[] ints = new int[10];
        // toString将对象转换成在堆中存储的内存的地址
        System.out.println(ints.toString());
    }

    public static void fun_2() {
        String s1 = "1234mm1234";
        String s2 = s1.substring(0, 6);
        System.out.println(s2); // 1234mm
        String s3 = s2.substring(4);
        System.out.println(s3);// mm
        boolean b1 = s1.startsWith("1");
        System.out.println(b1); //  true
        boolean b2 = s1.endsWith("34");
        System.out.println(b2); // true
        boolean b3 = s1.contains("mm");
        System.out.println("b3 " + b3);
        int index = s1.indexOf("3");
        System.out.println("index：" + index);
    }
}
